package org.dothwinds.springbootstudy.dao;

import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    /*
    无配置注解方式的代码
    @Insert("insert into user(name, addr, company) values(#{name}, #{addr}, #{company})")
    int add(@Param("name") String name, @Param("addr") String addr, @Param("company") String company);

    @Update("update user set name = #{name}, addr = #{addr}, company=#{company} where id = #{id}")
    int update(@Param("name") String name, @Param("addr") String addr,@Param("company") String company , @Param("id") long  id);

    @Delete("delete from user where id = #{id}")
    int delete(@Param("id") long  id);

    @Select("select * from user where id = #{id}")
    User findUserById(@Param("id") int id);
     */

    //配置文件版本
    int add(@Param("name") String name, @Param("addr") String addr, @Param("company") String company );

    int delete(@Param("id") long  id);
}
